package com.wanmait.wisdom.manage.controller;

import com.wanmait.wisdom.entity.Parking;
import com.wanmait.wisdom.manage.service.ManageParkingService;
import com.wanmait.wisdom.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("manage")
public class ManageParkingController {

    @Resource
    private ManageParkingService manageParkingService;

    @GetMapping("findAllParking")
    public AjaxResult findAllParking(){
        List<Parking> parkingList = manageParkingService.findAllParking();
        return AjaxResult.success().put("parkings",parkingList);
    }
}
